import Vue from 'vue'
import VueRouter from 'vue-router'
// display展示
import AccendentDisplay from '@accendent/AccendentDisplay.vue'
import AlarmMsgDisplay from '@alarm/AlarmMsgDisplay.vue'
import AlarmSetDisplay from '@alarm/AlarmSetDisplay.vue'
import BookingDisplay from '@operations/BookingDisplay.vue'
import CardDisplay from '@operations/CardDisplay.vue'
import ClientDisplay from '@operations/ClientDisplay.vue'
import CostRuleDisplay from '@operations/CostRuleDisplay.vue'
import ShareDisplay from '@operations/ShareDisplay.vue'
import VehicleDisplay from '@operations/VehicleDisplay.vue'
import DeptDisplay from '@system/DeptDisplay.vue'
import RoleDisplay from '@system/RoleDisplay.vue'
import UserDisplay from '@system/UserDisplay.vue'
import HostDisplay from '@host/HostDisplay.vue'
import PileDisplay from '@station_pile/PileDisplay.vue'
import StationDisplay from '@station_pile/StationDisplay.vue'
import TaskDisplay from '@accendent/TaskDisplay.vue'

// add展示
import DeptAdd from '@system/DeptAdd.vue'
import RoleAdd from '@system/RoleAdd.vue'
import UserAdd from '@system/UserAdd.vue'

// update展示
import DeptUpdate from '@system/DeptUpdate.vue'
import RoleUpdate from '@system/RoleUpdate.vue'
import UserUpdate from '@system/UserUpdate.vue'

// detail展示
import DeptDetail from '@system/DeptDetail.vue'
import RoleDetail from '@system/RoleDetail.vue'
import UserDetail from '@system/UserDetail.vue'

import BasicDisplay from '@components/BasicDisplay'
import Login from '@components/Login.vue'

Vue.use(VueRouter)

const routes = [
  {
    path: '/',
    component: BasicDisplay,
    children: [
      /*========================== display显示============================== */
      {
        path: '/',
        redirect: '/hostDisplay'
      },
      {
        path: '/accendentDisplay',
        component: AccendentDisplay,
      },
      {
        path: '/alarmMsgDisplay',
        component: AlarmMsgDisplay,
      },
      {
        path: '/alarmSetDisplay',
        component: AlarmSetDisplay,
      },
      {
        path: '/bookingDisplay',
        component: BookingDisplay,
      },
      {
        path: '/cardDisplay',
        component: CardDisplay,
      },
      {
        path: '/clientDisplay',
        component: ClientDisplay,
      },
      {
        path: '/costRuleDisplay',
        component: CostRuleDisplay,
      },
      {
        path: '/deptDisplay',
        component: DeptDisplay,
      },
      {
        path: '/hostDisplay',
        component: HostDisplay,
      },
      {
        path: '/pileDisplay',
        component: PileDisplay,
      },
      {
        path: '/roleDisplay',
        component: RoleDisplay,
      },
      {
        path: '/shareDisplay',
        component: ShareDisplay,
      },
      {
        path: '/stationDisplay',
        component: StationDisplay,
      },
      {
        path: '/taskDisplay',
        component: TaskDisplay,
      },
      {
        path: '/userDisplay',
        component: UserDisplay,
      },
      {
        path: '/vehicleDisplay',
        component: VehicleDisplay,
      },

      /*========================== add显示============================== */
      {
        path: '/deptAdd',
        component: DeptAdd,
      },
      {
        path: '/roleAdd',
        component: RoleAdd,
      },
      {
        path: '/userAdd',
        component: UserAdd,
      },

      /*========================== update显示=========================== */
      {
        path: '/deptUpdate',
        component: DeptUpdate,
      },
      {
        path: '/roleUpdate',
        component: RoleUpdate,
      },
      {
        path: '/userUpdate',
        component: UserUpdate,
      },

      /*========================== detatail显示========================= */
      {
        path: '/deptDetail',
        component: DeptDetail,
      },
      {
        path: '/roleDetail',
        component: RoleDetail,
      },
      {
        path: '/userDetail',
        component: UserDetail,
      },
    ]
  },
  {
    path: '/login',
    component: Login
  }
]

const router = new VueRouter({
  routes
})

export default router